import {Component, Inject, OnInit} from '@angular/core';
import {SmarketComponentsLibService} from '../smarket-components-lib.service';

@Component({
  selector: 'smarket-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.scss']
})
export class HeaderComponent implements OnInit {

  title = '默认标题';

  constructor(private service$: SmarketComponentsLibService) {
  }

  ngOnInit() {
    this.service$.getHeaderData()
      .subscribe((data: any) => {
        this.title = data.title;
      });
  }

}
